home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 June: Technology Seed / June 98 ADC Seed.toast / Mac OS 8.5a8 Pseudo SDK / interfaces-and-libraries / PInterfaces / Finder.p < prev    next >
Encoding:
Text File  |  1998-06-19  |  6.1 KB  |  207 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        Finder.p
  3.  
  4.      Contains:    Finder flags and container types.
  5.  
  6.      Version:    Technology:    Mac OS 8.1
  7.                  Release:    Allego Seed, Use with 3.1 Universal Interfaces
  8.  
  9.      Copyright:    © 1990-1998 by Apple Computer, Inc., all rights reserved
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT Finder;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __FINDER__}
  28. {$SETC __FINDER__ := 1}
  29.  
  30. {$I+}
  31. {$SETC FinderIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __MACTYPES__}
  35. {$I MacTypes.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __QUICKDRAW__}
  38. {$I Quickdraw.p}
  39. {$ENDC}
  40. {$IFC UNDEFINED __EVENTS__}
  41. {$I Events.p}
  42. {$ENDC}
  43.  
  44.  
  45. {$PUSH}
  46. {$ALIGN MAC68K}
  47. {$LibExport+}
  48.  
  49.  
  50. CONST
  51.     kCustomIconResource            = -16455;                        {  Custom icon family resource ID  }
  52.  
  53.     kContainerFolderAliasType    = 'fdrp';                        {  type for folder aliases  }
  54.     kContainerTrashAliasType    = 'trsh';                        {  type for trash folder aliases  }
  55.     kContainerHardDiskAliasType    = 'hdsk';                        {  type for hard disk aliases  }
  56.     kContainerFloppyAliasType    = 'flpy';                        {  type for floppy aliases  }
  57.     kContainerServerAliasType    = 'srvr';                        {  type for server aliases  }
  58.     kApplicationAliasType        = 'adrp';                        {  type for application aliases  }
  59.     kContainerAliasType            = 'drop';                        {  type for all other containers  }
  60.     kDesktopPrinterAliasType    = 'dtpa';                        {  type for Desktop Printer alias  }
  61.     kContainerCDROMAliasType    = 'cddr';                        {  type for CD-ROM alias  }
  62.                                                                 {  types for Special folder aliases  }
  63.     kSystemFolderAliasType        = 'fasy';
  64.     kAppleMenuFolderAliasType    = 'faam';
  65.     kStartupFolderAliasType        = 'fast';
  66.     kPrintMonitorDocsFolderAliasType = 'fapn';
  67.     kPreferencesFolderAliasType    = 'fapf';
  68.     kControlPanelFolderAliasType = 'fact';
  69.     kExtensionFolderAliasType    = 'faex';                        {  types for AppleShare folder aliases  }
  70.     kExportedFolderAliasType    = 'faet';
  71.     kDropFolderAliasType        = 'fadr';
  72.     kSharedFolderAliasType        = 'fash';
  73.     kMountedFolderAliasType        = 'famn';
  74.  
  75.                                                                 {  Finder Flags  }
  76.     kIsOnDesk                    = $0001;
  77.     kColor                        = $000E;
  78.     kIsShared                    = $0040;                        {  bit 0x0080 is hasNoINITS  }
  79.     kHasBeenInited                = $0100;                        {  bit 0x0200 was the letter bit for AOCE, but is now reserved for future use  }
  80.     kHasCustomIcon                = $0400;
  81.     kIsStationery                = $0800;
  82.     kNameLocked                    = $1000;
  83.     kHasBundle                    = $2000;
  84.     kIsInvisible                = $4000;
  85.     fInvisible                    = $4000;                        {  old name of kIsInvisible Finder flag  }
  86.     kIsAlias                    = $8000;
  87.  
  88. {$IFC OLDROUTINENAMES }
  89.     kIsStationary                = $0800;
  90.  
  91. {$ENDC}  {OLDROUTINENAMES}
  92.  
  93. {    
  94.     The following declerations used to be in Files.≈, 
  95.     but are Finder specific and were moved here.
  96. }
  97.                                                                 {  Finder Constants  }
  98.     fOnDesk                        = 1;
  99.     fHasBundle                    = 8192;
  100.     fTrash                        = -3;
  101.     fDesktop                    = -2;
  102.     fDisk                        = 0;
  103.  
  104.  
  105. TYPE
  106.     FInfoPtr = ^FInfo;
  107.     FInfo = RECORD
  108.         fdType:                    OSType;                                    { the type of the file }
  109.         fdCreator:                OSType;                                    { file's creator }
  110.         fdFlags:                UInt16;                                    { flags ex. hasbundle,invisible,locked, etc. }
  111.         fdLocation:                Point;                                    { file's location in folder }
  112.         fdFldr:                    INTEGER;                                { folder containing file }
  113.     END;
  114.  
  115.     FXInfoPtr = ^FXInfo;
  116.     FXInfo = RECORD
  117.         fdIconID:                INTEGER;                                { Icon ID }
  118.         fdUnused:                ARRAY [0..2] OF INTEGER;                { unused but reserved 6 bytes }
  119.         fdScript:                SInt8;                                    { Script flag and number }
  120.         fdXFlags:                SInt8;                                    { More flag bits }
  121.         fdComment:                INTEGER;                                { Comment ID }
  122.         fdPutAway:                LONGINT;                                { Home Dir ID }
  123.     END;
  124.  
  125.     DInfoPtr = ^DInfo;
  126.     DInfo = RECORD
  127.         frRect:                    Rect;                                    { folder rect }
  128.         frFlags:                UInt16;                                    { Flags }
  129.         frLocation:                Point;                                    { folder location }
  130.         frView:                    INTEGER;                                { folder view }
  131.     END;
  132.  
  133.     DXInfoPtr = ^DXInfo;
  134.     DXInfo = RECORD
  135.         frScroll:                Point;                                    { scroll position }
  136.         frOpenChain:            LONGINT;                                { DirID chain of open folders }
  137.         frScript:                SInt8;                                    { Script flag and number }
  138.         frXFlags:                SInt8;                                    { More flag bits }
  139.         frComment:                INTEGER;                                { comment }
  140.         frPutAway:                LONGINT;                                { DirID }
  141.     END;
  142.  
  143.  
  144. { Values of the 'message' parameter to a Control Panel 'cdev' }
  145.  
  146. CONST
  147.     initDev                        = 0;                            { Time for cdev to initialize itself }
  148.     hitDev                        = 1;                            { Hit on one of my items }
  149.     closeDev                    = 2;                            { Close yourself }
  150.     nulDev                        = 3;                            { Null event }
  151.     updateDev                    = 4;                            { Update event }
  152.     activDev                    = 5;                            { Activate event }
  153.     deactivDev                    = 6;                            { Deactivate event }
  154.     keyEvtDev                    = 7;                            { Key down/auto key }
  155.     macDev                        = 8;                            { Decide whether or not to show up }
  156.     undoDev                        = 9;
  157.     cutDev                        = 10;
  158.     copyDev                        = 11;
  159.     pasteDev                    = 12;
  160.     clearDev                    = 13;
  161.     cursorDev                    = 14;
  162.  
  163.  
  164. { Special values a Control Panel 'cdev' can return }
  165.     cdevGenErr                    = -1;                            { General error; gray cdev w/o alert }
  166.     cdevMemErr                    = 0;                            { Memory shortfall; alert user please }
  167.     cdevResErr                    = 1;                            { Couldn't get a needed resource; alert }
  168.     cdevUnset                    = 3;                            {  cdevValue is initialized to this }
  169.  
  170. { Control Panel Default Proc }
  171.  
  172. TYPE
  173. {$IFC TYPED_FUNCTION_POINTERS}
  174.     ControlPanelDefProcPtr = FUNCTION(message: INTEGER; item: INTEGER; numItems: INTEGER; cPanelID: INTEGER; VAR theEvent: EventRecord; cdevValue: LONGINT; cpDialog: DialogPtr): LONGINT;
  175. {$ELSEC}
  176.     ControlPanelDefProcPtr = ProcPtr;
  177. {$ENDC}
  178.  
  179.     ControlPanelDefUPP = UniversalProcPtr;
  180.  
  181. CONST
  182.     uppControlPanelDefProcInfo = $000FEAB0;
  183.  
  184. FUNCTION NewControlPanelDefProc(userRoutine: ControlPanelDefProcPtr): ControlPanelDefUPP;
  185.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  186.     INLINE $2E9F;
  187.     {$ENDC}
  188.  
  189. FUNCTION CallControlPanelDefProc(message: INTEGER; item: INTEGER; numItems: INTEGER; cPanelID: INTEGER; VAR theEvent: EventRecord; cdevValue: LONGINT; cpDialog: DialogPtr; userRoutine: ControlPanelDefUPP): LONGINT;
  190.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  191.     INLINE $205F, $4E90;
  192.     {$ENDC}
  193.  
  194.  
  195.  
  196.  
  197. {$ALIGN RESET}
  198. {$POP}
  199.  
  200. {$SETC UsingIncludes := FinderIncludes}
  201.  
  202. {$ENDC} {__FINDER__}
  203.  
  204. {$IFC NOT UsingIncludes}
  205.  END.
  206. {$ENDC}
  207.